/**
 * @author: HenryDai
 * @Date: 2022/04/29 13:19
 * @description:
 */
public class NoMoneyState implements State{

    @Override
    public void insertCoins(VendingMachine machine) {
        System.out.println("操作正确: 在没钱的状态下投入了硬币, 变为有钱状态");
        machine.setState(new HavingMoneyState());
    }

    @Override
    public void backCoins(VendingMachine machine) {
        System.out.println("操作错误: 没钱的状态下, 不许允许退钱");
    }

    @Override
    public void pressButton(VendingMachine machine) {
        System.out.println("操作错误: 没钱的状态下, 不许允许按键");
    }

    @Override
    public void distributeGood(VendingMachine machine) {
        System.out.println("操作错误: 没钱的状态下, 不能发放商品");
    }
}
